package com.example.demo.entity;

import java.io.Serializable;
import java.util.Objects;

public class Nurse implements Serializable {
    private Integer nid;
    private String nname;
    private String ntel;
    private String naddr;

    public Nurse(Integer nid, String nname, String ntel, String naddr) {
        this.nid = nid;
        this.nname = nname;
        this.ntel = ntel;
        this.naddr = naddr;
    }

    public Nurse() {
    }

    public Integer getNid() {
        return nid;
    }

    public void setNid(Integer nid) {
        this.nid = nid;
    }

    public String getNname() {
        return nname;
    }

    public void setNname(String nname) {
        this.nname = nname;
    }

    public String getNtel() {
        return ntel;
    }

    public void setNtel(String ntel) {
        this.ntel = ntel;
    }

    public String getNaddr() {
        return naddr;
    }

    public void setNaddr(String naddr) {
        this.naddr = naddr;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Nurse nurse = (Nurse) o;
        return Objects.equals(nid, nurse.nid) && Objects.equals(nname, nurse.nname) && Objects.equals(ntel, nurse.ntel) && Objects.equals(naddr, nurse.naddr);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nid, nname, ntel, naddr);
    }

    @Override
    public String toString() {
        return "Nurse{" +
                "nid=" + nid +
                ", nname='" + nname + '\'' +
                ", ntel='" + ntel + '\'' +
                ", naddr='" + naddr + '\'' +
                '}';
    }
}
